#include <iostream>
#include <memory>
#include <string>
#include <cstring>
#include <cstdlib>
#include "TcpServer.hpp"
using namespace std;


int main(int argc, char* args[]) {
    if (argc != 2) {
        cout << "Usage:\n\r" << args[0] << " local_port\n" << endl;
        return 0; 
    }
    uint16_t local_port = stoi(args[1]);
    // 创建服务器
    unique_ptr<TcpServer> ts = unique_ptr<TcpServer>(new TcpServer(local_port));
    ts->Init();
    ts->Start();
    return 0;
}   